package com.axon.base.managers
{
	import com.axon.base.helpers.AxWaitPanel;
	
	import mx.core.Application;

	public class AxWaitManager
	{
		private static var ghostPanel: AxWaitPanel = null;

		//////////////////////////////////////////////////////////////////////////////////////////////////////
		
		public function AxWaitManager()
		{
			super();
		}
		
		//////////////////////////////////////////////////////////////////////////////////////////////////////
		
		public static function beginWaitMode(): void
		{
//			var parent: DisplayObject= Application.application.systemManager.getChildAt(Application.application.systemManager.numChildren - 1);
//			
//			ghostPanel = AxonPopUpManager.openPopUpWindow(parent, AxonPanelGhost, null, true) as AxonPanelGhost;
//			AxonPopUpManager.centerPopUp(ghostPanel);
//			Application.application.cursorManager.setBusyCursor();
		}
		
		//////////////////////////////////////////////////////////////////////////////////////////////////////
		
		public static function endWaitMode(): void
		{
			Application.application.cursorManager.removeBusyCursor();
			AxPopUpManager.closePopUpWindow(ghostPanel);
		}
	}
}